package com.yun.blog.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

/**
 * title        : TagRelation
 * projectName  : dantouBlog-back
 * description  : 博客与标签的关系类
 * author       : simple
 * date         : 2022/11/23下午8:07
 */

/*
-- 创建博客与标签的关系表
CREATE TABLE `blog_tag_relation`
(
    `relation_id` int UNSIGNED PRIMARY KEY NOT NULL AUTO_INCREMENT COMMENT '关系表id',
    `blog_id`     int                      NOT NULL COMMENT '博客id',
    `tag_id`      int                      NOT NULL COMMENT '标签id'
);
* */
@Data
@TableName("blog_tag_relation")
public class TagRelation {

    @TableId(type = IdType.AUTO)
    private Integer relationId;

    private Integer blogId;
    private Integer tagId;

}
